<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddCourseTimeToGroupCourseOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('group_course_orders', function (Blueprint $table) {
            $table->date('course_date')->nullable()->comment('上课日期')->after('paid_time');
            $table->time('course_start_time')->nullable()->comment('上课开始时间')->after('course_date');
            $table->time('course_end_time')->nullable()->comment('上课结束时间')->after('course_start_time');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('group_course_orders', function (Blueprint $table) {
            $table->dropColumn(['course_date', 'course_start_time', 'course_end_time']);
        });
    }
}
